#ifndef _SCREEN_HEADER
#define _SCREEN_HEADER

#include <string>

class Screen{
	std::string _content;
public:
	typedef std::string::size_type index;
private:
	index _cursor;
	index _height, _width;
	mutable std::size_t _access_ctr;

public:	
	Screen(std::string content, index width = 100, index height = 100):_content(content), _width(width), _height(height), _cursor(0), _access_ctr(0){}

	char get() const {
		return _content[_cursor];
	}
	char get(index ht, index wd) const;
	index get_cursor() const{
		return _cursor;
	}
	Screen& move(index r, index c);
	Screen& set(char);
	Screen& set(index, index, char);
	Screen& display(std::ostream&);
	const Screen& display(std::ostream&) const;
	void do_display(std::ostream &os) const{
		os << _content << std::endl;
	}
};

#endif // _SCREEN_HEADER